package com.cm.res.scanner;

import java.util.HashMap;
import java.util.Map;

public class ResourceConstant {

    public static String[] TYPE_DRAWABLE = {
            ".jpeg", ".xml", ".png", ".jpg"
    };

    public static String[] TYPE_MIPMAP = {
            ".jpeg", ".xml", ".png", ".jpg"
    };

    public static String[] TYPE_RAW = {
            ""
    };

    public static String[] TYPE_ANIMATION = {
            ".xml"
    };

    public static String[] TYPE_LAYOUT = {
            ".xml"
    };


    public static Map<String, String[]> RESOURCES_MAP = new HashMap<>();

    static {

        RESOURCES_MAP.put("drawable", TYPE_DRAWABLE);
        RESOURCES_MAP.put("mipmap", TYPE_MIPMAP);
        RESOURCES_MAP.put("raw", TYPE_RAW);
        RESOURCES_MAP.put("animation", TYPE_ANIMATION);
        RESOURCES_MAP.put("anim", TYPE_ANIMATION);
        RESOURCES_MAP.put("animator", TYPE_ANIMATION);
        RESOURCES_MAP.put("layout", TYPE_LAYOUT);
    }

    public static String[] getSubfixes(String resourceType) {
        return RESOURCES_MAP.get(resourceType);
    }
}
